<?php


namespace App\Admin\Forms\Config;


use App\Models\Config\SystemData;
use Dcat\Admin\Form\NestedForm;
use Dcat\Admin\Widgets\Form;
use Illuminate\Support\Arr;

class SeoConfig extends JsonConfigForm
{
    public static function label(): array
    {
        return [
            "seo_title" => "SEO Title",
            "seo_description" => "SEO Description",
            "seo_keywords" => "SEO Keywords",
        ];
    }


    public function form()
    {
        $label = static::label();

        $this->text('seo_title', Arr::get($label, "seo_title"));
        $this->textarea('seo_description', Arr::get($label, "seo_description"));
        $this->textarea('seo_keywords', Arr::get($label, "seo_keywords"));
    }

    public function configKey(): string
    {
        return SystemData::DATA_SEO_INDEX;
    }

    public function configName() :string
    {
        return "首页SEO";
    }
}
